<template>
  <div>
    <van-form>
      <van-field
        v-model="form.strProgramnum"
        name="节目单编号"
        label="节目单编号"
      />
      <van-field
        v-model="form.strUsername"
        name="节目单名称"
        label="节目单名称"
      />
      <van-field
        v-model="form.strCycle"
        name="播放周期"
        label="播放周期"
      />
      <van-field
        v-model="form.strEnddate"
        name="有效期"
        label="有效期"
      />
      <div style="display: flex">
        <van-field
          name="节目单类型"
          label="节目单类型"
        />
        <div class="iUrgentflex">{{form.iUrgent === 1 ? '紧急' : '普通'}}</div>
      </div>
      <van-field
        v-model="form.countnum"
        name="素材数量"
        label="素材数量"
      />
      <van-field
        class="yycard_btn"
        label="素材数据"
        @click="getMaterialData()"
      />
    </van-form>
    <van-button type="primary" block @click="editButton()">修改节目单</van-button>
  </div>
</template>
<script>
  import {ShowDetail} from '@/api/application'
  import axios from 'axios'

  export default {
    name: 'detailApplication',
    data() {
      return {
        form: {}
      }
    },
    created() {
      this.form = JSON.parse(this.$route.query.rowAll)
    },
    methods: {
      getMaterialData() {
        this.$router.push({
          path: 'MaterialList',
          query: {iProgramsysnum: this.form.iProgramsysnum}
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .yyp {
    text-align: center;
    font-size: 14px;
    color: #8c8a8a;
    line-height: 2;
  }

  .yycard {
    display: flex;
    border-bottom: 1px solid whitesmoke;
    padding: 5px 0;
    margin-left: 20px;
  }

  .yyimg {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background-color: #F5F7FA;
  }

  .yycard_p {
    font-size: 12px;
    line-height: 20px;
    vertical-align: middle;
    padding-left: 10px;
    color: #6b6b6b;
  }

  .yycard_title {
    font-size: 14px;
    color: #000;
  }

  /deep/ .yycard_btn .van-field__label {
    background: #0c1b35;
    color: #fff;
    width: auto;
    padding: 0 5px;
    border-radius: 4px;
  }

  .uploadImg {
    display: flex;
    padding: 16px;
    align-items: center;
    align-self: start;
    justify-content: space-around;

    span {
      flex: 1;
      font-size: 14px;
    }

    .right-soan {
      text-align: right;
    }
  }

  .van-uploader__wrapper {
    flex-wrap: nowrap;
  }

  /deep/ .van-field__control {
    text-align: right;
  }

  /deep/ .van-field__error-message {
    text-align: right;
  }

  .van-button--primary {
    background-color: #0c1b35;
    border-color: #0c1b35;
    border-radius: 4px;
    width: 90%;
    margin: 20px;
  }

  .iUrgentflex {
    display: flex;
    align-items: center;
    width: 47px;
    font-size: 14px;
  }
</style>
